<?php
/**
 * Created by PhpStorm.
 * User: shuixian
 * Date: 2019/11/20
 * Time: 18:29
 */

$menu = <<<DIY
{
    "path":"/diy",
    "component":"Layout",
    "redirect":"/diy/list",
    "meta":{
        "menuName":"diy",
        "icon":"iconchaifenyemian",
        "subNavName":[
            {
                "name":"diySub",
                "url":[
                    {
                        "name":"diyList",
                        "url":"/diy/list"
                    },
                    {
                        "name":"diyColor",
                        "url":"/diy/color"
                    }
                ]
            }
        ]
    },
    "children":[
        {
            "path":"list",
            "name":"diyList",
            "component":"/diy/list",
            "meta":{
                "keepAlive":true,
                "title":"diySub",
                "auth":[

                ],
                "isOnly":false,
                "pagePermission":[
                    {
                        "title":"diyList",
                        "index":0,
                        "auth":[
                            "view",
                            "add",
                            "edit",
                            "del",
                            "outport"
                        ]
                    }
                ]
            }
        },
        {
            "path":"color",
            "name":"diyColor",
            "component":"/diy/color",
            "meta":{
                "keepAlive":true,
                "title":"diySub",
                "auth":[

                ],
                "isOnly":false,
                "pagePermission":[
                    {
                        "title":"diyColor",
                        "index":0,
                        "auth":[
                            "view",
                            "add",
                            "edit",
                            "del",
                            "outport"
                        ]
                    }
                ]
            }
        },
        {
            "path":"edit",
            "name":"diySub",
            "component":"/diy/edit",
            "meta":{
                "keepAlive":true,
                "title":"diySub",
                "auth":[

                ],
                "isOnly":false,
                "pagePermission":[
                    {
                        "title":"diySub",
                        "index":0,
                        "auth":[
                            "view",
                            "add",
                            "edit",
                            "del",
                            "outport"
                        ]
                    }
                ]
            }
        }
    ]
}
DIY;
//不是智慧推客的没有颜色
$menus = <<<DIY
{
    "path":"/diy",
    "component":"Layout",
    "redirect":"/diy/list",
    "meta":{
        "menuName":"diy",
        "icon":"iconchaifenyemian",
        "subNavName":[
            {
                "name":"diySub",
                "url":[
                    {
                        "name":"diyList",
                        "url":"/diy/list"
                    },
                    {
                        "name":"diyColor",
                        "url":"/diy/color"
                    }
                ]
            }
        ]
    },
    "children":[
        {
            "path":"list",
            "name":"diyList",
            "component":"/diy/list",
            "meta":{
                "keepAlive":true,
                "title":"diySub",
                "auth":[

                ],
                "isOnly":false,
                "pagePermission":[
                    {
                        "title":"diyList",
                        "index":0,
                        "auth":[
                            "view",
                            "add",
                            "edit",
                            "del",
                            "outport"
                        ]
                    }
                ]
            }
        },
        {
            "path":"color",
            "name":"diyColor",
            "component":"/diy/color",
            "meta":{
                "keepAlive":true,
                "title":"diySub",
                "auth":[

                ],
                "isOnly":false,
                "pagePermission":[
                    {
                        "title":"diyColor",
                        "index":0,
                        "auth":[
                            "view",
                            "add",
                            "edit",
                            "del",
                            "outport"
                        ]
                    }
                ]
            }
        },
        {
            "path":"edit",
            "name":"diySub",
            "component":"/diy/edit",
            "meta":{
                "keepAlive":true,
                "title":"diySub",
                "auth":[

                ],
                "isOnly":false,
                "pagePermission":[
                    {
                        "title":"diySub",
                        "index":0,
                        "auth":[
                            "view",
                            "add",
                            "edit",
                            "del",
                            "outport"
                        ]
                    }
                ]
            }
        }
    ]
}

DIY;

//return json_decode($menu, true);
return sassAuth()==1?['diy' => $menu]:['diy' => $menus];


